<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 WiYun Inc.

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
  
          http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<com.wiyun.game.widget.OverlapFrameLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content">
	
	<LinearLayout
		android:id="@+id/wy_ll_main_panel"
		android:layout_width="300dp"
		android:layout_height="wrap_content"
		android:layout_gravity="bottom|center_horizontal"
		android:maxHeight="470dp"
		android:orientation="vertical"
		android:padding="10dp"
		android:background="@drawable/wy_dialog_bg">
	
		<!-- label: challenge name -->
		<TextView
			android:id="@+id/wy_tv_challenge_name"
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:layout_marginLeft="7dp"
			style="@style/TextAppearance.Small.Shadow"
			android:textStyle="bold"/>
		
		<!-- bet panel -->
		<LinearLayout
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:orientation="vertical"
			android:background="@drawable/wy_dialog_block_bg">
			
			<LinearLayout
				android:layout_width="fill_parent"
				android:layout_height="wrap_content"
				android:padding="6dp"
				android:orientation="horizontal"
				android:gravity="center_vertical">
				
				<LinearLayout
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:paddingLeft="10dp"
					android:orientation="vertical">
				
					<!-- score hint text -->
					<TextView 
						android:id="@+id/wy_tv_score_and_bet"
					    android:layout_width="fill_parent"
					    android:layout_height="wrap_content"
					    style="@android:style/TextAppearance.Small.Inverse"
					    android:textStyle="bold"/>
					    
					<!-- bet hint text -->
					<TextView 
					    android:layout_width="fill_parent"
					    android:layout_height="wrap_content"
					    style="@android:style/TextAppearance.Small.Inverse"
					    android:text="@string/wy_label_bet_honor_hint"/>
				    
				</LinearLayout>
				
				<!-- bet button -->
				<Button
					android:id="@+id/wy_b_bet"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					style="@android:style/TextAppearance.Medium"
					android:background="@drawable/wy_button_style15"
					android:text="@string/wy_button_bet"/>
				    
			</LinearLayout>

			<!-- separator -->
			<View
				android:layout_width="fill_parent"
				android:layout_height="2dp"
				android:background="@drawable/wy_dialog_block_inside_horizontal_separator"/>
															
			<!-- challenge message panel -->
			<LinearLayout
				android:layout_width="fill_parent"
				android:layout_height="wrap_content"
				android:padding="6dp"
				android:orientation="horizontal"
				android:gravity="center_vertical">
				
				<!-- challenge message -->
				<EditText
					android:id="@+id/wy_et_challenge_message"
					android:layout_width="0dp"
					android:layout_height="30dp"
					android:layout_weight="1"
					android:singleLine="true"
					android:textAppearance="@android:style/TextAppearance.Small.Inverse"
					android:background="@drawable/wy_left_round_editbox"
					android:hint="@string/wy_placeholder_input_challenge_message"/>
	
				<!-- send button -->
				<Button
					android:id="@+id/wy_b_send"
					android:layout_width="wrap_content"
					android:layout_height="30dp"
					android:layout_marginTop="-2dp"
					android:minWidth="64dp"
					android:background="@drawable/wy_button_style14"
					style="@android:style/TextAppearance.Small"
					android:textColor="@android:color/white"
					android:text="@string/wy_button_send"/>
					
			</LinearLayout>
			
		</LinearLayout>

		<!-- label: select competitor -->
		<TextView
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:layout_marginTop="6dp"
			android:layout_marginLeft="7dp"
			style="@style/TextAppearance.Small.Shadow"
			android:text="@string/wy_label_select_competitor"
			android:textStyle="bold"/>
			
		<LinearLayout
			android:id="@+id/wy_tab_bar"
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:paddingLeft="2dp"
			android:paddingRight="2dp"
			android:orientation="horizontal">
			
			<!-- friends tab -->
			<Button
				android:id="@+id/wy_tab"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:background="@drawable/wy_dialog_tab"
				style="@style/TextAppearance.Small.Shadow"
				android:text="@string/wy_send_challenge_friends"/>
				
			<!-- separator -->
			<View
				android:layout_width="2dp"
				android:layout_height="35dp"
				android:background="@drawable/wy_dialog_tab_separator"/>
				
			<!-- neighbor tab -->
			<Button
				android:id="@+id/wy_tab2"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:background="@drawable/wy_dialog_tab"
				style="@style/TextAppearance.Small.Shadow"
				android:text="@string/wy_send_challenge_neighbors"/>

			<!-- separator -->
			<View
				android:layout_width="2dp"
				android:layout_height="35dp"
				android:background="@drawable/wy_dialog_tab_separator"/>
								
			<!-- by score tab -->
			<Button
				android:id="@+id/wy_tab3"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:background="@drawable/wy_dialog_tab"
				style="@style/TextAppearance.Small.Shadow"
				android:text="@string/wy_send_challenge_by_score"/>
			
		</LinearLayout>

		<LinearLayout
			android:layout_width="fill_parent"
			android:layout_height="164dp"
			android:orientation="vertical"
			android:background="@drawable/wy_dialog_half_block_bg">
			
			<!-- friends list -->
			<ListView
				android:id="@android:id/list"
				android:layout_width="fill_parent"
				android:layout_height="0dp"
				android:layout_weight="1"
				android:divider="@drawable/wy_separator_h_style2"
				android:dividerHeight="2dp"
				android:cacheColorHint="@android:color/transparent"
				android:scrollbarThumbVertical="@drawable/wy_scrollbar_vertical_thumb_style1"
				android:fadingEdge="none"/>
			
		</LinearLayout>
			
	</LinearLayout>

	<!-- progress panel -->
	<include layout="@layout/wy_panel_progress"/>
	
	<!-- close button -->
    <Button 
    	android:id="@+id/wy_b_close"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_gravity="right|top"
        android:background="@drawable/wy_button_close_dialog"/>
        
</com.wiyun.game.widget.OverlapFrameLayout>